package com.lyxedu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyxedu.pojo.RoleMenu;
import com.lyxedu.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    @Delete("DELETE FROM role_menu WHERE role_id = #{roleId}")
    int deleteRoleWithById(@Param("roleId") Integer roleId);

    @Select("select role_Id,menu_id from role_menu where role_id = #{roleId}")
    List<RoleMenu> selectByIdList(Integer roleId);
}
